
builder.html {
    blogLayout.head() {text ->
        title("${text} ${blogConfig.title}")
    }
    blogLayout.body(tags, blogConfig) {
        gp.authenticated {
            gp.anchor(controller:"post", action:"edit") {"New post"}
            gp.anchor(controller:"post", action:"postsInProgress") {"Posts in progress"}
        }
        posts.each {post ->
            div(id: "post${post.underscoredTitle}", 'class':'postcontainer') {
                h3 {
                    gp.anchor(controller:"post", action:"view", id:"${post.urlTitle}") {
                        post.title
                    }
                }
                span('class':"blogtags") {
                    gp.tagsAsLinks(post.tags)
                }
                p('class': "teaser", post.teaser) {}
                p('class': "lastupdated",
                        "Last updated: ${gp.formatDate("dd-MMM-yyyy", post.lastUpdated)}")
            }
        }
    }
}